package com.ssy.lingxi.marketing.model.bo;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 活动商品BO
 * @author yzc
 * @version 2.0.0
 * @date 2021/9/1
 */
@Getter
@Setter
public class ActivityGoodsTestResp implements Serializable {

    private static final long serialVersionUID = -2276489362703034192L;

    /**
     * 活动类型
     */
    List<Activity> activityList;

    /**
     * 商品id
     */
    private Long productId;

    /**
     * skuId
     */
    private Long skuId;

    /**
     * 商品价格(原价)
     * */
    private BigDecimal price;

    /**
     * 购买数量
     */
    private Integer num;

    private SpecialOffer specialOffer;

    private Plummet plummet;

    private Discount discount;

    private FullQuantity fullQuantity;

    private FullMoney fullMoney;

    private Give give;

    private MorePiece morePiece;

    private Combination combination;

    private Swap swap;

    @Setter
    @Getter
    public static class Activity {
        private Long activityId;

        private Integer activityType;

        private Integer belongType;
    }

    @Setter
    @Getter
    private static class baseActivityDefine {
        /**
         * 可优惠购数量
         */
        private Integer preferentialNum;

        /**
         * 个人限购数量
         */
        private Integer restrictNum;

        /**
         * 是否允许叠加优惠劵
         * */
        private Boolean allowCoupon;

        /**
         * 超限规则：1-原价购买 2-不可购买
         * */
        private Integer exceedRule;

        /**
         * 优惠标签
         */
        private String preferentialTag;

        /**
         * 优惠标签描述
         */
        private String preferentialTagDesc;
    }

    @Setter
    @Getter
    public static class SpecialOffer extends baseActivityDefine {
        /**
         * 商品价格(优惠价)
         */
        private BigDecimal preferentialPrice;

        /**
         * 预估到手价
         */
        private BigDecimal estimatePrice;
    }

    @Setter
    @Getter
    public static class Plummet extends baseActivityDefine {
        /**
         * 商品价格(优惠价)
         */
        private BigDecimal preferentialPrice;

        /**
         * 预估到手价
         */
        private BigDecimal estimatePrice;
    }

    @Setter
    @Getter
    public static class Discount extends baseActivityDefine {
        /**
         * 商品价格(优惠价)
         */
        private BigDecimal preferentialPrice;

        /**
         * 预估到手价
         */
        private BigDecimal estimatePrice;
    }

    @Setter
    @Getter
    public static class FullQuantity extends baseActivityDefine {
        /**
         * 商品价格(优惠价)
         */
        private BigDecimal preferentialPrice;

        /**
         * 预估到手价
         */
        private BigDecimal estimatePrice;

        /**
         * 优惠阶梯
         */
        private List<FullQuantityBO.LadderBO> ladderList;
    }

    @Setter
    @Getter
    public static class FullMoney extends baseActivityDefine {
        /**
         * 商品价格(优惠价)
         */
        private BigDecimal preferentialPrice;

        /**
         * 预估到手价
         */
        private BigDecimal estimatePrice;

        /**
         * 优惠阶梯
         */
        private List<FullMoneyBO.LadderBO> ladderList;
    }

    @Setter
    @Getter
    public static class Give extends baseActivityDefine {
        /**
         * 赠送促销类型：1-满额赠 2-买商品赠
         * */
        private Integer giveType;

        /**
         * 赠品类型：1-赠商品 2-赠优惠卷
         * */
        private Integer giftType;

        /**
         * 商品赠品、换购商品、套餐商品（组）
         */
        private List<ActivityGoodsSubsidiaryGroupBO> goodsSubsidiaryGroupList;

        /**
         * 商品赠优惠券信息（组）
         */
        private List<ActivityGoodsCouponGroupBO> goodsCouponGroupList;
    }

    @Setter
    @Getter
    public static class MorePiece extends baseActivityDefine {

        /**
         * 优惠阶梯
         */
        private List<MorePieceBO.LadderBO> ladderList;
    }

    @Setter
    @Getter
    public static class Combination extends baseActivityDefine {

        /**
         * 优惠规则 - 数量
         * */
        private Integer num;

        /**
         * 优惠规则 - 金额
         * */
        private BigDecimal price;

        /**
         * 优惠阶梯
         */
        private List<MorePieceBO.LadderBO> ladderList;
    }

    @Setter
    @Getter
    public static class Swap extends baseActivityDefine {

        /**
         * 换购类型：1-满额换购 2-买商品换购
         * */
        private Integer swapType;
    }

}
